#ifndef __AB_SET_H
#define __AB_SET_H


typedef struct{
	uint8_t orbital_dir;
	uint8_t speeds;
	uint8_t loop;
	uint8_t dir;
	uint8_t Ramp;
	uint8_t Ramp_if;
	uint8_t ab_set;
	uint8_t findsABpoint;
	uint32_t lenght;
	uint32_t ab_pulse;
	uint32_t pointA;
	uint32_t pointB;
	uint32_t loop_stop_times;
	
	
}AB_SETPAR;

typedef struct{
	uint8_t slow_time;
	uint8_t slow_up;
	uint8_t ramp_add;
	uint8_t ramp_id;
	uint16_t ramp_bf[25];
	uint16_t ramp_pulse;
	
}AB_RAMPS;

uint32_t abs(uint32_t b, uint32_t a);
uint32_t PULSE_SUM(uint16_t anglel);
void Check_Usart_Number_Send(uint8_t *buffer, uint8_t buffer_size);
void ABmode_Get_Manual_mode_speed(void);
void abMode_Ramp_Speed_Load(uint32_t speeds);
void AB_mode_ramp_check(void);
void ABmode_send_abPointSet_status(uint8_t tatuse);
void ABmode_send_current_status(uint8_t dirss);
uint8_t Check_direction_before_starting(void);
void Loop_stop_Timeout(void);

extern uint8_t devices_reset_if;

#endif

